function voltar() {
	history.go(-1);
	return;
}

function prepareTableHeader(tableName)
{
	var table = document.getElementById(tableName);
	var header = table.getElementsByTagName("thead");
	var links = table.getElementsByTagName("a");
	for (i=0; i < rows.length; i++) {
		var curLink = links[i];

		curLink.onclick = function() {
			var target = curLink.search;
			var toadd = target.subString(1,target.length);
			var baseaction = document.forms[0].action;
			if (baseaction.indexOf("?") == -1)
			{
			document.forms[0].action = baseaction + "?" + toadd;
			}
			else
			{
			document.forms[0].action = baseaction + "&" + toadd;
			}
			document.forms[0].submit();
			return false;
		};
    }
}